Skip to main content
Version: Windows SDK 3.2.4

Events Subscribers

Register events delegate

RegisterEventsDelegate Method

Registers a delegate for the SDK events. The method getAsyncInterface in HapiFactory executes internally this subscription.

Parameters
ParameterNotes
listener Required
Object
Any Object implementing one or more of the available delegate interfaces

Code example

public class ObjectHelper : Events.Required, Events.Status, Events.Log {
...
private void RegisterEventHandler() {
// Register this class as listener for events
this.api.RegisterEventsDelegate(this);
...
}

}

Returns

ParameterNotes
BooleanTrue if the new delegate was added successfully.

Unregister events delegate

UnregisterEventsDelegate Method

Unregisters an object from SDK events.

Parameters

ParameterNotes
listener Required
Object
Any Object implementing one or more of the available delegate interfaces

Code example

public class ObjectHelper : Events.Required, Events.Status, Events.Log {
...
private void Unsubscribe() {
// Stop receiving events
this.api.UnregisterEventsDelegate(this);
...
}

Returns

ParameterNotes
BooleanTrue if the new delegate was removedded successfully.